Known washing machines comprise a casing containing a washing tub in which there is a rotatable laundry drum in which the laundry to be washed can be loaded. A hydraulic circuit is provided for taking washing liquid, i.e. water and water mixed with a cleaning product, inside the washing tub and the laundry drum, so as to wash or rinse the laundry, and for draining, e.g. by using a drain pump, this liquid outside the machine. In other known washing machines drain pump is not provided and the washing liquid is drained from the tub by gravity.
During a washing cycle in a washing machine, one or more dewatering phases, balancing phases, spinning phases and rinsing phases are performed. When the washing liquid is moved, for example by rotating the laundry drum, in particular when such liquid contains a detergent, a certain amount of foam is typically generated. If too much foam is generated in the washing tub or in the draining region thereof, then some phases of the washing cycle cannot be faultlessly performed.
In particular an high amount of foam can be very negative during the spinning and draining phase of the washing cycle (in which the laundry drum is rotated at high speed and the liquid present in the washing tub is drained from the machine), since the foam compromises a correct functioning of the drain pump (if provided) and it obstructs the draining of the liquid from the machine.
Some known methods for operating a washing machine are known, in which the amount of foam in the washing tub is monitored, in particular during the spinning phase, in order to start a foam reducing procedure if this amount is too high; these known methods detect the amount of the foam after stopping the rotation of the drum. Stopping the rotation of the drum causes the laundry contained therein to fall in the bottom of the drum and to rearrange itself in a stochastic way.
These known washing methods comprise, before any spinning phase, an unbalancing detecting/reducing phase, in which the degree of unbalance of the laundry inside the drum is detected, and possibly reduced by performing one or more stops and/or slow movements of the drum, which causes the laundry to rearrange its position. The problem of these known methods for detecting the amount of foam is that, since the drum is stopped before detecting the amount of foam (and the amount is detected with the drum stationary), each time the foam amount is detected before or during a spinning phase, a new unbalance phase has to be performed (since even if the laundry was previously in a balanced condition, by stopping the drum for detecting the amount of foam, the laundry rearranges itself in the drum, and therefore its position changes), which increases the duration and the energy consumption of the cycle.